
import 'package:flutter/material.dart';
import 'package:xim/widget/common/state.dart';
import 'package:xim/common/get_style_view.dart';

class MessageDetailStyle extends Style with AppBarMixin{

  @override
  Color get appBarBgColor => appBarColor.color;

  @override
  String get appBarTitle => "消息详情";

  @override
  double get elevation => 0.5;

  @override
  TextStyle get appBarTitleStyle =>  TextStyle(
    color: textColor.color,
    fontSize: 15
  );

  Widget rowItem(Widget leftItem, Widget rightItem){
    return Row(
      mainAxisAlignment: MainAxisAlignment.spaceBetween,
      crossAxisAlignment: CrossAxisAlignment.center,
      children: [
        leftItem,
        rightItem
      ],
    );
  }

  Widget titleRowItem(String title, Widget? rightItem){
    var titleItem = Text(title, style: TextStyle(color: textColor.color),);
    return rowItem(titleItem, rightItem ?? const SizedBox());
  }

  Widget textRowItem(String title, String text){
    var titleItem = Text(title, style: TextStyle(color: textColor.color),);
    var textItem = Text(text, style: TextStyle(color: textColor.color),);
    return rowItem(titleItem, textItem);
  }


}